/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package volcarobjetos;

/**
 *
 * @author User
 */
public class Triangulo extends Figura{
    private float base;
    private float altura;

    public Triangulo(float base, float altura, String color) {
        super(color);
        this.base = base;
        this.altura = altura;
    }

    public float AreaTriangulo (float base, float altura){
    
        return(float) base*altura/2;
    }

}